﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;

#nullable disable

namespace System.CJL.Infrstructre.Migrations
{
    /// <inheritdoc />
    public partial class 原料和工序 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Processs",
                columns: table => new
                {
                    ProcessId = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    ProcessNumebring = table.Column<string>(type: "text", nullable: true),
                    ProcessName = table.Column<string>(type: "text", nullable: true),
                    ProcessStatus = table.Column<int>(type: "integer", nullable: false),
                    ProcessIllustrate = table.Column<string>(type: "text", nullable: true),
                    ProcessReamrk = table.Column<string>(type: "text", nullable: true),
                    ProcessDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    IsDelete = table.Column<bool>(type: "boolean", nullable: false),
                    AddName = table.Column<string>(type: "text", nullable: true),
                    AddTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    UpdateName = table.Column<string>(type: "text", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    DelectName = table.Column<string>(type: "text", nullable: true),
                    DelectTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Processs", x => x.ProcessId);
                });

            migrationBuilder.CreateTable(
                name: "RawMaterials",
                columns: table => new
                {
                    RawMaterialId = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    RawMaterialNumbering = table.Column<string>(type: "text", nullable: true),
                    RawMaterialName = table.Column<string>(type: "text", nullable: true),
                    RawMaterialClassify = table.Column<string>(type: "text", nullable: true),
                    RawMaterialSize = table.Column<string>(type: "text", nullable: true),
                    RawMaterialSpecModel = table.Column<string>(type: "text", nullable: true),
                    RawMaterialAttribute = table.Column<string>(type: "text", nullable: true),
                    RawMaterialUnit = table.Column<string>(type: "text", nullable: true),
                    RawMaterialinventory = table.Column<int>(type: "integer", nullable: false),
                    RawMaterialType = table.Column<string>(type: "text", nullable: true),
                    RawMaterilStatus = table.Column<int>(type: "integer", nullable: false),
                    RawMaterialNumber = table.Column<int>(type: "integer", nullable: false),
                    RawMaterialDay = table.Column<int>(type: "integer", nullable: false),
                    InventoryMaximums = table.Column<int>(type: "integer", nullable: false),
                    InentoryLower = table.Column<int>(type: "integer", nullable: false),
                    RawMateriallocation = table.Column<string>(type: "text", nullable: true),
                    RawMaterialDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
                    RawMaterialReamrk = table.Column<string>(type: "text", nullable: true),
                    RawMaterialImage = table.Column<string>(type: "text", nullable: true),
                    IsDelete = table.Column<bool>(type: "boolean", nullable: false),
                    AddName = table.Column<string>(type: "text", nullable: true),
                    AddTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    UpdateName = table.Column<string>(type: "text", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    DelectName = table.Column<string>(type: "text", nullable: true),
                    DelectTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_RawMaterials", x => x.RawMaterialId);
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Processs");

            migrationBuilder.DropTable(
                name: "RawMaterials");
        }
    }
}
